package Com.amit.corejava;

class B
{
	Lab31 obj;
	
	B(Lab31 obj)
	{
		this.obj=obj;
	}
	
	public void display()
	{
		System.out.println(obj.data);
	}
}

public class Lab31 {
	
	int data=10;

	Lab31()
	{
		B b=new B(this);
		b.display();
		
		
	}
	
	public static void main(String[] args) {
		
		Lab31 l=new Lab31();
		
		

	}

}
